const express = require('express');
const router = express.Router();
let count = 1;
router.get('/exchangeRateRecord/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            brands: [
                {
                    id: '1',
                    code: 'code1',
                    name: '品牌1',
                }
            ]
        }
    });
});
router.get('/claim/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
            enterprise: {
                id: '1',
                code: 'JXS',
                name: '测试经销商',
                currency: 1
            }
        }
    });
});

router.get('/claimProformaInvoice/init', async(req, res, next) => {
    count += 1;
    const options = {
    };
    const data = {
        message: 'message',
        payload: {
            isDealerUser: Boolean(count % 2)
        }
    };
    res.json(data);
});

router.get('/dealerServiceInformation/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: false,
            brands: [
                {
                    id: 'de872f12',
                    code: 'code1',
                    name: '品牌1',
                },
                {
                    id: '392e69de',
                    code: 'code2',
                    name: '品牌2',
                },
            ],
            tradeMethods: [
                {
                    id: '26e30b7b',
                    code: '1000',
                    name: '奇瑞股份',
                },
                {
                    id: '52a1ad34',
                    code: '2020',
                    name: '海外实业',
                },
            ],
        }
    });
});
router.get('/claimSettlement/init', async(req, res, next) => {
    count += 1;
    const data = {
        message: 'message',
        payload: {
            isDealerUser: Boolean(count % 2),
            tradeMethods: [
                {
                    id: 'id353',
                    code: 'code354',
                    name: 'name355'
                },
                {
                    id: 'id356',
                    code: 'code357',
                    name: 'name358'
                }
            ],
            manucturers: [
                {
                    id: 'id1',
                    code: 'code1',
                    name: '工厂1',
                },
                {
                    id: 'id2',
                    code: 'code2',
                    name: '工厂2',
                }
            ],
        }
    };
    res.json(data);
});

router.get('/subClaim/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
            enterprise: {
                id: '1',
                code: 'JXS',
                name: '测试经销商',
                dealerCode: 'DL',
                dealerName: '总代理',
                currency: 1,
                country: '中国'
            }
        }
    });
});
router.get('/usedPartDestory/init', async(req, res, next) => {
    const options = {
    };
    count += 1;
    const data = {
        message: 'message',
        payload: {
            isDealerUser: Boolean(count % 3),
            dealerType: count % 3
        }
    };
    res.json(data);
});

router.get('/marketDepartment/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            isBrandUser: true,
            enterprise: {
                id: '1111',
                code: '10145',
                name: '品牌名称'
            },
            brands: [
                {
                    id: '1',
                    code: 'code1',
                    name: '品牌1',
 
                },
                {
                    id: '2',
                    code: 'code2',
                    name: '品牌2',
 
                },
                {
                    id: '3',
                    code: 'code3',
                    name: '品牌3',
                },
            ],
            areas: [
                {
                    id: '1',
                    areaName: '亚太',
 
                },
                {
                    id: '2',
                    areaName: '东南亚',
 
                },
                {
                    id: '3',
                    areaName: '欧洲',
                },
            ]
        }
    });
});
router.get('/vehicleSold/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/exceptionInfoTransfer/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
            dealer: {
                dealerCode: '服务站编号',
                dealerName: '服务站名称',
                region: '华北',
                country: '中国',
            }
        }
    });
});
router.get('/salesInformation/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            isSubDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/claimApply/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1',
                mgmtRate: 0.5
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2',
                mgmtRate: 0.12
            }]
        }
    });
});
router.get('/workItem/init', async(req, res, next) => {
    const options = {
    };
    const data = {
        message: 'message',
        payload: {
            workItemCategoryTypes: [{
                id: '1',
                level: 1,
                isLeaf: false,
                name: '系统'
            }, {
                id: '2',
                level: 2,
                isLeaf: false,
                name: '总成'
            }, {
                id: '3',
                level: 3,
                isLeaf: false,
                name: '总成2'
            }, {
                id: '4',
                level: 4,
                isLeaf: true,
                name: '配件'
            }]
        }
    };
    res.json(data);
});
router.get('/dealerWorkItem/init', async(req, res, next) => {
    const options = {
    };
    const data = {
        message: 'message',
        payload: {
            workItemCategoryTypes: [{
                id: '1',
                level: 1,
                isLeaf: false,
                name: '系统'
            }, {
                id: '2',
                level: 2,
                isLeaf: false,
                name: '总成'
            }, {
                id: '3',
                level: 3,
                isLeaf: false,
                name: '总成2'
            }, {
                id: '4',
                level: 4,
                isLeaf: true,
                name: '配件'
            }]
        }
    };
    res.json(data);
});
router.get('/subClaimApply/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
            enterprise: {
                id: '1',
                code: 'JXS',
                name: '测试经销商',
                dealerCode: 'DL',
                dealerName: '总代理',
                currency: 1,
                country: '中国'
            }
        }
    });
});
router.get('/manucturer/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/vehicleMaintainRecord/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isCompanyUser: !(count % 2),
        }
    });
});
router.get('/serviceActivitie/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/secondaryDealerService/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isSubDealerUser: !(count % 2),
            brands: [
                {
                    id: 'de872f12',
                    code: 'code1',
                    name: '品牌1',
                },
                {
                    id: '392e69de',
                    code: 'code2',
                    name: '品牌2',
                },
            ],
        }
    });
});
router.get('/localPart/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
        }
    });
});
router.get('/expenseAdjustment/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [
                {
                    id: 'de872f12',
                    code: 'code1',
                    name: '品牌1',
                },
                {
                    id: '392e69de',
                    code: 'code2',
                    name: '品牌2',
                },
            ],
        }
    });
});
router.get('/secondClaimSummary/init', async(req, res, next) => {
    count += 1;
    const data = {
        message: 'message',
        payload: {
            brands: [
                {
                    id: '1',
                    code: 'code1',
                    name: '品牌1',
                },
                {
                    id: '2',
                    code: 'code2',
                    name: '品牌2',
                },
            ],
            secomdClaimPeriods: [
                {
                    id: 'id1',
                    code: 'code1',
                    brandId: '1',
                    startDay: 2,
                    endDay: 15
                },
                {
                    id: 'id2',
                    code: 'code2',
                    brandId: '1',
                    startDay: 16,
                    endDay: 25
                },
                {
                    id: 'id1',
                    code: 'code1',
                    brandId: '2',
                    startDay: 3,
                    endDay: 8
                },
                {
                    id: 'id2',
                    code: 'code2',
                    name: '2',
                    startDay: 9,
                    endDay: 23
                }
            ],
        }
    };
    res.json(data);
});
router.get('/dutyUnitWarrantie/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/dutyUnitReplace/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/qualityArbitration/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/preClaimInfo/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/goodWillBudget/init', (req, res) => {
    res.json({
        message: '查询成功',
        payload: {
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/goodWill/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            country: 'string',
            currency: 1,
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1',
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2',
            }],
        }
    });
});
router.get('/goodwillSettlement/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/technologyActivities/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [
                {
                    id: 'de872f12',
                    code: 'code1',
                    name: '品牌1',
                },
                {
                    id: '392e69de',
                    code: 'code2',
                    name: '品牌2',
                },
            ],
        }
    });
});
router.get('/technologyActivityClaimSettlement/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/technologyActivityDelayApply/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/technologyActivityClaim/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
            enterprise: {
                id: '1',
                code: 'JXS',
                name: '测试经销商',
                dealerCode: 'DL',
                dealerName: '总代理',
                currency: 1,
                country: '中国'
            }
        }
    });
});
router.get('/marketingActivityDeclare/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
            activityTarget: {
                id: '1',
                type: 1,
                lastDate: '1',
                estimateData: '',
                proportion: 1
            },
            dealerService: {
                currency: 1
            }
        }
    });
});
router.get('/marketingActivityReport/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            dealerCode: 'dealerCode',
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
router.get('/technicalSupport/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            dealerType: count % 3,
            enterprise: {
                dealerId: 'string',
                subDealerId: 'string',
                dealerCode: 'string',
                subDealerCode: 'string',
                dealerName: 'string',
                subDealerName: 'string',
                telPhone: 'string',
                email: 'string'
            }
        }
    });
});
router.get('/technicalCaseReport/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
            productCategory: [{
                id: '1',
                code: 'code1',
                name: '车型1'
            }, {
                id: '2',
                code: 'code2',
                name: '车型2'
            }],
        }
    });
});
router.get('/monthInformation/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
        }
    });
});
router.get('/serviceQuestionnaire/init', (req, res) => {
    count += 1;
    res.json({
        message: '查询成功',
        payload: {
            isDealerUser: !(count % 2),
            country: 'country',
            city: 'city',
            brands: [{
                id: '1',
                code: 'code1',
                name: '品牌1'
            }, {
                id: '2',
                code: 'code2',
                name: '品牌2'
            }],
        }
    });
});
module.exports = router;
